mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
doc work
This commit is contained in:
parent
eae18a4ef8
commit
f36353cfea
3 changed files with 8 additions and 122 deletions
|
@ -1,57 +0,0 @@
|
|||
# Ethics And Business Conduct Policy
|
||||
|
||||
Contributed Systems LLC complies with this policy and all laws and regulations applicable to our business, wherever conducted. This policy applies to Contributed Systems, the company signing this policy, and to all our employees and those that provide services to us (either “Supplier” or “us”). As a Supplier, you must ensure that the practices and principles outlined in this policy flow down throughout your own supply chain. Where local laws are less restrictive than this policy, you must comply with the policy, even if your conduct would otherwise be legal.
|
||||
|
||||
## Anti-Corruption, Export Control and Sanctions Compliance.
|
||||
|
||||
We do not make or promise to make corrupt payments of money or anything of value, directly or indirectly, to any government or public international organization officials, political parties, or candidates for political office, or any company director, officer, employee, or agent of a commercial customer or supplier, for the purpose of obtaining or retaining business or securing any improper advantage. We adhere to applicable anti-corruption and anti-bribery laws, directives and regulations that govern operations in the countries in which they operate. We avoid facilitation payments and work towards eliminating them. We comply with all national and international foreign trade control laws pertaining to business transactions with countries, companies and persons (sanctions), and the transfer of goods and services, software or technology between countries (export controls).
|
||||
|
||||
## Accurate Records
|
||||
|
||||
We create accurate records, and do not alter any record entry to conceal or misrepresent the underlying transaction represented by it. All records, regardless of format, made or received as evidence of a business transaction must fully and accurately represent the transaction or event being documented. Records should be retained based on the applicable retention requirements. We accurately document all transactions related to your contracts with us and prevent side agreements, whether oral or written.
|
||||
|
||||
## Gifts/Business Courtesies
|
||||
|
||||
We use discretion and care to ensure that expenditures on customer personnel or representatives are reasonable and in the ordinary and proper course of business and could not reasonably be construed as bribes or improper inducement or otherwise violate applicable laws and/or regulations. Business courtesies offered should not be construed by a reasonable person as intending to influence the judgment of the recipient so as to gain improper advantage. We ensure that acceptance of any business courtesies, gifts, or entertainment is proper and could not reasonably be construed as an attempt by the offering party to secure favorable treatment or otherwise violate applicable laws and/or regulations.
|
||||
|
||||
## Antitrust And Competition Laws
|
||||
|
||||
We comply with all antitrust or competition laws. Unfair methods of competition and deceptive practices are also prohibited. Examples of these include making false or misleading representations about our products or services, making product or service claims without facts to substantiate them. We do not fix prices or rig bids with our competitors, do not exchange current, recent, or future pricing information with competitors, and do not participate in a cartel.
|
||||
|
||||
## Intellectual Property and Obligations of Confidentiality
|
||||
|
||||
We are responsible for protecting our intellectual property rights and those of our suppliers. We do not use proprietary information, technology or copyrighted software, documentation, or other materials of third parties without authorization. We safeguard confidential information by not transferring, publishing, using, or disclosing it other than for the business purpose for which it was provided or with the written permission of the owner.
|
||||
|
||||
## Data Privacy
|
||||
|
||||
We observe applicable data privacy laws and standards. Materials that contain confidential information or that are protected by privacy standards should be stored securely and shared only internally with those employees with a need to know. For example, confidential information may include, but is not limited to: source code, software, and other inventions or developments (regardless of the stage of development), marketing and sales plans, competitive analyses, product development plans, non-public pricing, potential contracts or acquisitions, business and financial plans or forecasts, internal business processes and practices, and prospect, customer, and employee information. We protect confidential information (which includes "personal information") to which we have access in providing our services.
|
||||
|
||||
## Conflicts Of Interest
|
||||
|
||||
We want our Customer's and Supplier’s loyalty to be free from any conflicts of interest. Conflict of interest means any circumstance that could cast doubt on your ability to act with total objectivity with regard to our interests. Conflict of interest situations may arise in many ways. If you feel that you have an actual or potential conflict with us or our employees, please report them using the contact info below.
|
||||
|
||||
## Business And Employment Relationships
|
||||
|
||||
We affirm the principle of equal employment and business opportunities without regard to discrimination, including but not limited to: race, religion, national origin, color, gender, gender identity, age, disability, pregnancy, marital status, national origin/ancestry, military status, or sexual orientation. We prohibit harassment in any form and expect that you provide a work environment free from harassment. We pay workers at least the minimum compensation required by local law and provide all legally mandated benefits. In addition to payment for regular hours of work, workers are paid for overtime at such premium rate as is legally required or, in those countries where such laws do not exist, at least equal to their regular hourly payment rate.
|
||||
|
||||
## Human Rights
|
||||
|
||||
We are committed to respecting human rights. Our commitment includes identifying, preventing and mitigating any adverse human rights impacts of our activities where possible. We expect you to share the same respect for human rights, including those principles recognized in international human rights standards such as the Universal Declaration of Human Rights (UDHR). Your approach to human rights should be consistent with the UN Guiding Principles on Business and Human Rights. You must comply with all applicable legal requirements related to human rights.
|
||||
|
||||
## Insider Trading
|
||||
|
||||
We do not use any material or nonpublicly disclosed information obtained in the course of any relationship as the basis for trading or for enabling others to trade in the stock or securities of any company.
|
||||
|
||||
## Reporting
|
||||
|
||||
Please report any conduct, including conduct of any of our employees, that you believe in good faith to be an actual, apparent, or potential violation of this policy. Reports will be handled as confidentially as possible. To report an incident, use the contact info below.
|
||||
|
||||
## Non-compliance Consequences
|
||||
|
||||
We recognize persistent non-compliance with this policy as a material breach of any contract we might have with the other party.
|
||||
|
||||
|
||||
/s/ Mike Perham, CEO, 2022-04-19
|
||||
|
||||
Company: Contributed Systems LLC
|
||||
E-mail: info@contribsys.com
|
|
@ -61,8 +61,7 @@ If you want to process jobs from two separate Redis instances, you need to start
|
|||
## Use Cases
|
||||
|
||||
With Capsules, you can programmatically tune how a Sidekiq process handles specific queues. One
|
||||
Capsule can use 1 thread to process jobs within a `thread_unsafe` queue while another Capsule uses
|
||||
10 threads to process `default` jobs.
|
||||
Capsule can use 1 thread to process jobs within a `thread_unsafe` queue while another Capsule uses 10 threads to process `default` jobs.
|
||||
|
||||
```ruby
|
||||
# within your initializer
|
||||
|
@ -78,14 +77,14 @@ The contents of `config/sidekiq.yml` configure the default capsule.
|
|||
|
||||
## Redis Pools
|
||||
|
||||
Before 7.0, the Sidekiq process would create a redis pool sized to `concurrency + 3`.
|
||||
Now Sidekiq will create multiple Redis pools: a global pool of **five** connections available to global components, a pool of **concurrency** for the job processors within each Capsule.
|
||||
Before 7.0, the Sidekiq process would create one redis pool sized to `concurrency + 3`.
|
||||
Now Sidekiq will create multiple Redis pools: an internal pool of **five** connections available to Sidekiq components along with a pool of **concurrency** for the job processors within each Capsule.
|
||||
|
||||
So for a Sidekiq process with a default Capsule and a single threaded Capsule, you should have three Redis pools of size 5, 10 and 1.
|
||||
For a Sidekiq process with a default Capsule and a single threaded Capsule, you should have three Redis pools of size 5, 10 and 1.
|
||||
Remember that connection pools are lazy so it won't create all those connections unless they are actively needed.
|
||||
|
||||
All Sidekiq components and add-ons should avoid using `Sidekiq.redis` or `Sidekiq.logger`.
|
||||
Instead use the implicit `redis` or `logger` methods available on `Sidekiq::Component`, `Sidekiq::Capsule` or `Sidekiq::{Client,Server}Middleware`.
|
||||
Sidekiq components and add-ons should avoid using `Sidekiq.redis` or `Sidekiq.logger`.
|
||||
Instead use the implicit `redis` or `logger` methods available on `Sidekiq::Component`, `Sidekiq::Capsule` or `Sidekiq::{Client,Server}Middleware`. Jobs may continue to use `Sidekiq.redis`, they will automagically use the capsule's pool of `concurrency` connections.
|
||||
|
||||
## Sidekiq::Component
|
||||
|
||||
|
@ -132,8 +131,8 @@ class Sidekiq::Processor
|
|||
end
|
||||
```
|
||||
|
||||
Sidekiq::Capsule overrides Sidekiq::Config in order to provide Capsule-local resources so
|
||||
you'll see places within Sidekiq where Capsule acts like a Config.
|
||||
Sidekiq::Capsule overrides Sidekiq::Config in order to provide Capsule-local resources;
|
||||
you'll see places within Sidekiq where Capsule acts like a Config. Code running within the Capsule will use resources local to that Capsule.
|
||||
|
||||
With this pattern, we greatly reduce the use of global APIs throughout Sidekiq internals.
|
||||
Where before we'd call `Sidekiq.xyz`, we instead provide similar functionality like
|
||||
|
|
|
@ -1,56 +0,0 @@
|
|||
# Reducing Global API usage in Sidekiq 7.0
|
||||
|
||||
In Sidekiq 6.x, we rely heavily on top-level APIs and options within the Sidekiq module itself. APIs like `Sidekiq.options` are used everywhere to pull dynamic configuration.
|
||||
This makes Sidekiq incompatible with Ractors or embedding within other processes.
|
||||
|
||||
# Implicit Configuration
|
||||
|
||||
Since the beginning, Sidekiq has used a global singleton for configuration. This was
|
||||
accessed via `Sidekiq.configure_{client,server} do |config|`. You don't create a Sidekiq
|
||||
instance but one is implicitly provided for you to configure.
|
||||
|
||||
Moving forward we want move to a more explicit `Sidekiq::Config` API which encapsulates this data. We provide backwards compatibility for the most widely used patterns but a few things
|
||||
will need to change:
|
||||
|
||||
```ruby
|
||||
# In 6.x `config` points to the Sidekiq module directly.
|
||||
# In 7.x it will be an instance of Sidekiq::Config.
|
||||
Sidekiq.configure_server do |config|
|
||||
config.options[:concurrency] = 5 # Sidekiq.options is deprecated
|
||||
config.concurrency = 5 # new
|
||||
end
|
||||
```
|
||||
|
||||
To be clear: `Sidekiq.configure_{client,server}` will remain supported for the
|
||||
foreseeable future. How Sidekiq works by default will remain very, very similar but these
|
||||
small tweaks will allow a new mode of operation for Sidekiq and unlock a few, new usecases...
|
||||
|
||||
# Explicit Configuration
|
||||
|
||||
Sidekiq 7.0 is expected to provide a new Ruby API for configuring and launching Sidekiq
|
||||
instances within an existing Ruby process. For instance, you could launch Sidekiq
|
||||
within a Puma process if you wanted to minimize the memory required for two separate
|
||||
processes (of course, the normal GIL caveats apply: one core can only handle so many requests and jobs). I call this **embedded mode**.
|
||||
|
||||
Another idea: you could start a second, small instance within your main Sidekiq process
|
||||
to limit concurrent job execution for a special queue. Maybe those jobs aren't thread-safe
|
||||
or use a 3rd party service which imposes a very limited access policy.
|
||||
|
||||
```ruby
|
||||
cfg = Sidekiq::Config.new
|
||||
cfg.concurrency = 1
|
||||
cfg.queues = %w[limited]
|
||||
|
||||
launcher = Sidekiq::Launcher.new(cfg) # cfg is now frozen!
|
||||
launcher.start
|
||||
# processing jobs!
|
||||
launcher.stop
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
- Every `Sidekiq::Launcher` instance is considered a separate "process" in the Web UI. You
|
||||
could launch N instances within one Ruby process and the Web UI will show N "processes". Why you'd want to do this, I don't know. "Just because you can doesn't mean you should" remains true.
|
||||
- How this configuration refactoring affects Sidekiq Pro and Sidekiq Enterprise remains to be
|
||||
seen. Existing functionality will remain supported and any breakage will be
|
||||
documented in the major version upgrade notes.
|
Loading…
Add table
Reference in a new issue