OSC / osc-reporting

Reporting on OOD jobs ran at OSC
MIT License
2 stars 0 forks source link

Print cluster info every 15 minutes after startup #27

Closed lukew3 closed 2 years ago

lukew3 commented 2 years ago

┆Issue is synchronized with this Asana task by Unito

lukew3 commented 2 years ago

@johrstrom It seems that I don't have permissions to update crontab using whenever. To schedule jobs, I have to run

bin/bundle exec whenever --update-crontab

from the terminal. This produces the error:

You (lweiler) are not allowed to use this program (crontab)
johrstrom commented 2 years ago

Lol, that was the first library i picked up. I didn't think it would use an actual crontab to schedule things, though I guess that kind of makes sense.

Let me look at that library once more to see if we don't need to use a crontab (that's sort of a nonstarter) and if not, then we need to find another library that'll schedule tasks for us.

johrstrom commented 2 years ago

Yea I think we'll have to just create a simple class that creates a new thread that's stuck in a loop forever (sleeping mostly). I think that's the easiest path forward, something simple that does the trick. No need to worry about passing blocks to some other class - just have the class know what it needs to do and do it.

lukew3 commented 2 years ago

Yea I think we'll have to just create a simple class that creates a new thread that's stuck in a loop forever (sleeping mostly). I think that's the easiest path forward, something simple that does the trick. No need to worry about passing blocks to some other class - just have the class know what it needs to do and do it.

I'm not sure what you mean by creating a new simple class. Where would it be created? Why don't we continue using jobs and using .set(wait: 15.minutes).perform_later()

johrstrom commented 2 years ago

You're right, this will work fine for now.

.set(wait: 15.minutes).perform_later