Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add forks #230

Closed
wants to merge 4 commits into from
Closed

Add forks #230

wants to merge 4 commits into from

Conversation

@Bogdanp
Copy link
Owner

@Bogdanp Bogdanp commented Oct 13, 2019

No description provided.

_type_ = c_byte


class ForksSet(Structure):
Copy link
Owner Author

@Bogdanp Bogdanp Oct 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Bogdanp
Copy link
Owner Author

@Bogdanp Bogdanp commented Oct 13, 2019

If anyone has a better name for this functionality other than forks/fork functions, I'm all ears. My imagination is failing me at the moment.

@Bogdanp
Copy link
Owner Author

@Bogdanp Bogdanp commented Oct 13, 2019

Also, if someone with access to a windows machine could give this a try I'd be super grateful.

Steps to try on windows:

  1. clone the repo and checkout this branch
  2. run pip install '.[rabbitmq]' in the root
  3. cd examples/basic
  4. dramatiq example
  5. visit http://127.0.0.1:9191 and make sure the Prometheus exposition server is running

@Bogdanp Bogdanp closed this Oct 16, 2019
@Bogdanp Bogdanp deleted the add-forks branch Oct 16, 2019
@bersace
Copy link
Contributor

@bersace bersace commented Oct 17, 2019

What do you think of side processes ?

@CaselIT
Copy link
Contributor

@CaselIT CaselIT commented Oct 2, 2020

Would you advise using a fork function when using apscheduler to for periodic jobs?
I have not found suggestions in the documentation regarding this, so I was wondering if it was advisable.

Also, if someone with access to a windows machine could give this a try I'd be super grateful.

Steps to try on windows:

1. clone the repo and checkout this branch

2. run `pip install '.[rabbitmq]'` in the root

3. `cd examples/basic`

4. `dramatiq example`

5. visit http://127.0.0.1:9191 and make sure the Prometheus exposition server is running

I bit late, but for what is worth, it does work on windows

@bersace
Copy link
Contributor

@bersace bersace commented Oct 2, 2020

@CaselIT I think not. I'm maintaining periodiq, and periodiq scheduler must be a single process. Side processes purpose is for all your worker processes (e.g. prometheus exporter).

@CaselIT
Copy link
Contributor

@CaselIT CaselIT commented Oct 2, 2020

Well, a fork function creates a new process for each one, so technically it is a single process as far as the scheduler is concerned.

Of course you cannot control it when starting it that was, so for a scheduler that has a cli it maybe not the best way, but apscheduler does not offer one.

@Bogdanp
Copy link
Owner Author

@Bogdanp Bogdanp commented Oct 3, 2020

@CaselIT the functionality is intended for side-loading code next to workers, so in that sense I think it's appropriate. You just need to be careful if you run multiple sets of workers.

@CaselIT
Copy link
Contributor

@CaselIT CaselIT commented Oct 5, 2020

Thanks for the reply. Yes, of course in case of multiple workers only one of them should start the scheduler or multiple jobs could be triggered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants