-
Notifications
You must be signed in to change notification settings - Fork 224
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
Concurrency and sdk mutation #64
Comments
Looks like you'll have to explicitly create an instance of FacebookAdsApi and use that as a constructor argument, rather than relying on the default instance created by the static
|
I would like to suggest, for the good of the sdk and the developers using it, to better document this method for instantiating the API. I'm sure that a common use case of this sdk is for developers who create apps who have multiple clients. Therefore, for each client needs a different It's easy to omit this detail and detail jump into other areas of code. In our case, the code was similar to the example provided & it never failed until we run it concurrently with different consumers who required different user tokens. During development, you don't have concurrency and this error can be easily leaked. Idem with tests. Thanks. |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information. |
We have a bunch of jobs that we would like to run concurrently. However, if we do so we have no guarantee that the appropriate token will be used. Simple reproduction case follows:
desired output:
actual output
Is there some way to work around this so that we can have multiple instances of the sdk running at the same time? Or is there a plan to support this kind of use in the future? Javascript in particular is heavily asynchronous, this side-effect behavior is not desirable. We've resorted to making the requests directly ourselves for now but would prefer to use the official sdk if possible.
The text was updated successfully, but these errors were encountered: