Would be nice to have a repeatable pattern for running something as either a paster script or as a task. Then with [#5658] a site admin could run a task and not need to have shell access.
Bonus points for setting __doc__ to the arg parse usage help.
Specific changes for refresh repos:
drop clean-all, too dangerous
need to remove close_all since it causes an error at Allura/allura/model/monq_model.py", line 248, in __call__ session(self).flush(self)
AttributeError: 'NoneType' object has no attribute 'flush'
can remove the old version of the script probably. Or keep it but have it just import and run the script task?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
forge:tv/5703
As a test, I converted the refresh-all-repos.py script to use the new pattern. You can run:
to execute it as a cmd-line script.
To run it as a task:
Explore making the task callable and not using a pickle or dispatcher.
Bonus points for setting
__doc__
to the arg parse usage help.Specific changes for refresh repos:
Allura/allura/model/monq_model.py", line 248, in __call__ session(self).flush(self) AttributeError: 'NoneType' object has no attribute 'flush'