-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NEW: Queue managing with DB2 ODBC connections
- Loading branch information
Showing
16 changed files
with
99 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/Connectors/DB2Connector.php → src/Database/Connectors/DB2Connector.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/Connectors/IBMConnector.php → src/Database/Connectors/IBMConnector.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/Connectors/ODBCConnector.php → src/Database/Connectors/ODBCConnector.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/Connectors/ODBCZOSConnector.php → src/Database/Connectors/ODBCZOSConnector.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/Query/Grammars/DB2Grammar.php → src/Database/Query/Grammars/DB2Grammar.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/Query/Processors/DB2Processor.php → ...atabase/Query/Processors/DB2Processor.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/Query/Processors/DB2ZOSProcessor.php → ...base/Query/Processors/DB2ZOSProcessor.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 1 addition & 7 deletions
8
src/Schema/Grammars/DB2ExpressCGrammar.php → ...se/Schema/Grammars/DB2ExpressCGrammar.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Schema/Grammars/DB2Grammar.php → src/Database/Schema/Grammars/DB2Grammar.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
namespace Cooperl\DB2\Queue; | ||
|
||
use Illuminate\Queue\Connectors\DatabaseConnector; | ||
|
||
class DB2Connector extends DatabaseConnector | ||
{ | ||
/** | ||
* Establish a queue connection. | ||
* | ||
* @param array $config | ||
* @return \Illuminate\Contracts\Queue\Queue | ||
*/ | ||
public function connect(array $config) | ||
{ | ||
return new DB2Queue( | ||
$this->connections->connection($config['connection'] ?? null), | ||
$config['table'], | ||
$config['queue'], | ||
$config['retry_after'] ?? 60 | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
namespace Cooperl\DB2\Queue; | ||
|
||
use Illuminate\Queue\DatabaseQueue; | ||
|
||
class DB2Queue extends DatabaseQueue | ||
{ | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getLockForPopping() | ||
{ | ||
return true; | ||
} | ||
|
||
} |