Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
到目前为止,我一直在使用上帝监视一个延迟的工作,并且它工作得很好。我想开始监控几个延迟的作业,我如何在说明上帝时传递一个参数来指示上帝应该监控/启动多少个延迟作业?
您可以在调用 god 之前在 shell 中设置一个预定义变量,然后在您的 god 配置中查找该 shell 变量的内容以了解要启动多少个作业。您可能需要该变量的默认值。
就像是: $ env GOD_JOBS=3 god ...
$ env GOD_JOBS=3 god ...
然后在你的上帝配置中使用以下内容: ENV['GOD_JOBS']
ENV['GOD_JOBS']