Closed aaronbronow closed 5 years ago
+1 on this one
Yep, currently the task uses a Dir[<mask>].collect...
to find all the existing task files https://github.com/theSteveMitchell/after_party/pull/24
it's not looking them up in the DB, because we want to list tasks that haven't run yet. Dir command doesn't sort by filename automatically. That's easy to add as Dir[<mask>].sort.collect...
Although I'd prefer to move the logic from that :status task into TaskRecorder class. I would also change that logic to both pull files and existing migrations in the DB, and union the two sources. That would handle the case where old task files were deleted (and unlike DB migrations, I do encourage deleting old task files, once they are no longer needed).
@theSteveMitchell I think a better way would be to sort them oldest(top), newest(bottom), just like migrations. So the timestamp would be the sorting argument
@theSteveMitchell To understand better, the case you were describing about old task files getting deleted. What were you thinking of displaying in the output of after_party:status
when these deleted files are detected.
@theSteveMitchell is anyone maintaining this repo anymore?
@aaronbronow @lacostenycoder apologies. This is addressed in #40, and I'll release a new version in the next day or two with that improvement.
I've not had capacity to maintain this for quite some time, but I'm back. I'll be working through the open queue and plan on releasing a V2 in the next few weeks. I'll also be looking for additional maintainers soon.
Hi, any idea why the tasks appear out of order when I run after_party:status?
Thanks