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 chinese readme & add chain metas #732

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .deepsource.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ name = "go"
enabled = true

[analyzers.meta]
import_paths = ["github.com/RichardKnop/machinery"]
import_paths = ["github.com/Michael-LiK/machinery"]
6 changes: 3 additions & 3 deletions Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ MAINTAINER Richard Knop <[email protected]>
ENV PATH /go/bin:$PATH

# Cd into the source code directory
WORKDIR /go/src/github.com/RichardKnop/machinery
WORKDIR /go/src/github.com/Michael-LiK/machinery
Copy link

Choose a reason for hiding this comment

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

probably shouldn't merge your name into the main repo @Michael-LiK

Copy link

Choose a reason for hiding this comment

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

if you're using this for local dev, check out replace syntax in mode files

Copy link
Author

Choose a reason for hiding this comment

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

OK THANKS


# Copy the local package files to the container's workspace.
ADD . /go/src/github.com/RichardKnop/machinery
ADD . /go/src/github.com/Michael-LiK/machinery

# Set GO111MODULE=on variable to activate module support
ENV GO111MODULE on

# Run integration tests as default command
CMD /go/src/github.com/RichardKnop/machinery/wait-for-it.sh rabbitmq:5672 -- make test-with-coverage
CMD /go/src/github.com/Michael-LiK/machinery/wait-for-it.sh rabbitmq:5672 -- make test-with-coverage
67 changes: 34 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
[1]: https://raw.githubusercontent.com/RichardKnop/assets/master/machinery/example_worker.png
[2]: https://raw.githubusercontent.com/RichardKnop/assets/master/machinery/example_worker_receives_tasks.png
[1]: https://raw.githubusercontent.com/Michael-LiK/assets/master/machinery/example_worker.png
[2]: https://raw.githubusercontent.com/Michael-LiK/assets/master/machinery/example_worker_receives_tasks.png
[3]: http://patreon_public_assets.s3.amazonaws.com/sized/becomeAPatronBanner.png

## Machinery

Machinery is an asynchronous task queue/job queue based on distributed message passing.

[![Travis Status for RichardKnop/machinery](https://travis-ci.org/RichardKnop/machinery.svg?branch=master&label=linux+build)](https://travis-ci.org/RichardKnop/machinery)
[![godoc for RichardKnop/machinery](https://godoc.org/github.com/nathany/looper?status.svg)](http://godoc.org/github.com/RichardKnop/machinery/v1)
[![codecov for RichardKnop/machinery](https://codecov.io/gh/RichardKnop/machinery/branch/master/graph/badge.svg)](https://codecov.io/gh/RichardKnop/machinery)
[![Travis Status for Michael-LiK/machinery](https://travis-ci.org/Michael-LiK/machinery.svg?branch=master&label=linux+build)](https://travis-ci.org/Michael-LiK/machinery)
[![godoc for Michael-LiK/machinery](https://godoc.org/github.com/nathany/looper?status.svg)](http://godoc.org/github.com/Michael-LiK/machinery/v1)
[![codecov for Michael-LiK/machinery](https://codecov.io/gh/Michael-LiK/machinery/branch/master/graph/badge.svg)](https://codecov.io/gh/Michael-LiK/machinery)

[![Go Report Card](https://goreportcard.com/badge/github.com/RichardKnop/machinery)](https://goreportcard.com/report/github.com/RichardKnop/machinery)
[![GolangCI](https://golangci.com/badges/github.com/RichardKnop/machinery.svg)](https://golangci.com)
[![Go Report Card](https://goreportcard.com/badge/github.com/Michael-LiK/machinery)](https://goreportcard.com/report/github.com/Michael-LiK/machinery)
[![GolangCI](https://golangci.com/badges/github.com/Michael-LiK/machinery.svg)](https://golangci.com)
[![OpenTracing Badge](https://img.shields.io/badge/OpenTracing-enabled-blue.svg)](http://opentracing.io)

[![Sourcegraph for RichardKnop/machinery](https://sourcegraph.com/github.com/RichardKnop/machinery/-/badge.svg)](https://sourcegraph.com/github.com/RichardKnop/machinery?badge)
[![Donate Bitcoin](https://img.shields.io/badge/donate-bitcoin-orange.svg)](https://richardknop.github.io/donate/)
[![Sourcegraph for Michael-LiK/machinery](https://sourcegraph.com/github.com/Michael-LiK/machinery/-/badge.svg)](https://sourcegraph.com/github.com/Michael-LiK/machinery?badge)
[![Donate Bitcoin](https://img.shields.io/badge/donate-bitcoin-orange.svg)](https://Michael-LiK.github.io/donate/)

---
* [中文文档](./README_CN.md)

* [V2 Experiment](#v2-experiment)
* [First Steps](#first-steps)
Expand Down Expand Up @@ -67,10 +68,10 @@ Instead of factory, you will need to inject broker and backend objects to the se

```go
import (
"github.com/RichardKnop/machinery/v2"
backendsiface "github.com/RichardKnop/machinery/v2/backends/iface"
brokersiface "github.com/RichardKnop/machinery/v2/brokers/iface"
locksiface "github.com/RichardKnop/machinery/v2/locks/iface"
"github.com/Michael-LiK/machinery/v2"
backendsiface "github.com/Michael-LiK/machinery/v2/backends/iface"
brokersiface "github.com/Michael-LiK/machinery/v2/brokers/iface"
locksiface "github.com/Michael-LiK/machinery/v2/locks/iface"
)

var broker brokersiface.Broker
Expand All @@ -85,13 +86,13 @@ server := machinery.NewServer(cnf, broker, backend, lock)
Add the Machinery library to your $GOPATH/src:

```sh
go get github.com/RichardKnop/machinery/v1
go get github.com/Michael-LiK/machinery/v1
```

Or to get experimental v2 release:

```sh
go get github.com/RichardKnop/machinery/v2
go get github.com/Michael-LiK/machinery/v2
```

First, you will need to define some tasks. Look at sample tasks in `example/tasks/tasks.go` to see a few examples.
Expand Down Expand Up @@ -313,7 +314,7 @@ For example:

1. `amqp://guest:guest@localhost:5672`

> Keep in mind AMQP is not recommended as a result backend. See [Keeping Results](https://github.com/RichardKnop/machinery#keeping-results)
> Keep in mind AMQP is not recommended as a result backend. See [Keeping Results](https://github.com/Michael-LiK/machinery#keeping-results)

##### MongoDB

Expand Down Expand Up @@ -392,7 +393,7 @@ type Interface interface {
}
```

Then just set the logger in your setup code by calling `Set` function exported by `github.com/RichardKnop/machinery/v1/log` package:
Then just set the logger in your setup code by calling `Set` function exported by `github.com/Michael-LiK/machinery/v1/log` package:

```go
log.Set(myCustomLogger)
Expand All @@ -404,8 +405,8 @@ A Machinery library must be instantiated before use. The way this is done is by

```go
import (
"github.com/RichardKnop/machinery/v1/config"
"github.com/RichardKnop/machinery/v1"
"github.com/Michael-LiK/machinery/v1/config"
"github.com/Michael-LiK/machinery/v1"
)

var cnf = &config.Config{
Expand Down Expand Up @@ -632,7 +633,7 @@ Tasks can be called by passing an instance of `Signature` to an `Server` instanc

```go
import (
"github.com/RichardKnop/machinery/v1/tasks"
"github.com/Michael-LiK/machinery/v1/tasks"
)

signature := &tasks.Signature{
Expand Down Expand Up @@ -797,8 +798,8 @@ Running a single asynchronous task is fine but often you will want to design a w

```go
import (
"github.com/RichardKnop/machinery/v1/tasks"
"github.com/RichardKnop/machinery/v1"
"github.com/Michael-LiK/machinery/v1/tasks"
"github.com/Michael-LiK/machinery/v1"
)

signature1 := tasks.Signature{
Expand Down Expand Up @@ -858,8 +859,8 @@ for _, asyncResult := range asyncResults {

```go
import (
"github.com/RichardKnop/machinery/v1/tasks"
"github.com/RichardKnop/machinery/v1"
"github.com/Michael-LiK/machinery/v1/tasks"
"github.com/Michael-LiK/machinery/v1"
)

signature1 := tasks.Signature{
Expand Down Expand Up @@ -934,8 +935,8 @@ for _, result := range results {

```go
import (
"github.com/RichardKnop/machinery/v1/tasks"
"github.com/RichardKnop/machinery/v1"
"github.com/Michael-LiK/machinery/v1/tasks"
"github.com/Michael-LiK/machinery/v1"
)

signature1 := tasks.Signature{
Expand Down Expand Up @@ -1020,7 +1021,7 @@ Machinery now supports scheduling periodic tasks and workflows. See examples bel

```go
import (
"github.com/RichardKnop/machinery/v1/tasks"
"github.com/Michael-LiK/machinery/v1/tasks"
)

signature := &tasks.Signature{
Expand All @@ -1046,8 +1047,8 @@ if err != nil {

```go
import (
"github.com/RichardKnop/machinery/v1/tasks"
"github.com/RichardKnop/machinery/v1"
"github.com/Michael-LiK/machinery/v1/tasks"
"github.com/Michael-LiK/machinery/v1"
)

signature1 := tasks.Signature{
Expand Down Expand Up @@ -1089,8 +1090,8 @@ if err != nil {

```go
import (
"github.com/RichardKnop/machinery/v1/tasks"
"github.com/RichardKnop/machinery/v1"
"github.com/Michael-LiK/machinery/v1/tasks"
"github.com/Michael-LiK/machinery/v1"
)

signature1 := tasks.Signature{
Expand Down Expand Up @@ -1142,8 +1143,8 @@ if err != nil {

```go
import (
"github.com/RichardKnop/machinery/v1/tasks"
"github.com/RichardKnop/machinery/v1"
"github.com/Michael-LiK/machinery/v1/tasks"
"github.com/Michael-LiK/machinery/v1"
)

signature1 := tasks.Signature{
Expand Down
Loading