Skip to content

Commit db7e05d

Browse files
committed
fs polling interval
1 parent 30dbf4b commit db7e05d

5 files changed

Lines changed: 17 additions & 17 deletions

File tree

‎pkg/fs/FsConnectionFactory.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class FsConnectionFactory implements PsrConnectionFactory
1818
* 'path' => 'the directory where all queue\topic files remain. For example /home/foo/enqueue',
1919
* 'pre_fetch_count' => 'Integer. Defines how many messages to fetch from the file.',
2020
* 'chmod' => 'Defines a mode the files are created with',
21-
* 'polling_interval' => 'How often query for new messages, default 1000 (milliseconds)',
21+
* 'polling_interval' => 'How often query for new messages, default 100 (milliseconds)',
2222
* ]
2323
*
2424
* or
@@ -105,7 +105,7 @@ private function defaultConfig()
105105
'path' => null,
106106
'pre_fetch_count' => 1,
107107
'chmod' => 0600,
108-
'polling_interval' => 1000,
108+
'polling_interval' => 100,
109109
];
110110
}
111111
}

‎pkg/fs/FsConsumer.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class FsConsumer implements PsrConsumer
3131
/**
3232
* @var int microseconds
3333
*/
34-
private $pollingInterval = 1000000;
34+
private $pollingInterval = 100000;
3535

3636
/**
3737
* @param FsContext $context

‎pkg/fs/Symfony/FsTransportFactory.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ public function addConfiguration(ArrayNodeDefinition $builder)
5757
->info('The queue files are created with this given permissions if not exist.')
5858
->end()
5959
->integerNode('polling_interval')
60-
->defaultValue(1000)
61-
->min(100)
60+
->defaultValue(100)
61+
->min(50)
6262
->info('How often query for new messages.')
6363
->end()
6464
;

‎pkg/fs/Tests/FsConnectionFactoryConfigTest.php‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public static function provideConfigs()
5858
'path' => sys_get_temp_dir().'/enqueue',
5959
'pre_fetch_count' => 1,
6060
'chmod' => 0600,
61-
'polling_interval' => '1000',
61+
'polling_interval' => 100,
6262
],
6363
];
6464

@@ -68,7 +68,7 @@ public static function provideConfigs()
6868
'path' => sys_get_temp_dir().'/enqueue',
6969
'pre_fetch_count' => 1,
7070
'chmod' => 0600,
71-
'polling_interval' => '1000',
71+
'polling_interval' => 100,
7272
],
7373
];
7474

@@ -78,7 +78,7 @@ public static function provideConfigs()
7878
'path' => sys_get_temp_dir().'/enqueue',
7979
'pre_fetch_count' => 1,
8080
'chmod' => 0600,
81-
'polling_interval' => '1000',
81+
'polling_interval' => 100,
8282
],
8383
];
8484

@@ -88,7 +88,7 @@ public static function provideConfigs()
8888
'path' => sys_get_temp_dir().'/enqueue',
8989
'pre_fetch_count' => 1,
9090
'chmod' => 0600,
91-
'polling_interval' => '1000',
91+
'polling_interval' => 100,
9292
],
9393
];
9494

@@ -98,7 +98,7 @@ public static function provideConfigs()
9898
'path' => '/foo/bar/baz',
9999
'pre_fetch_count' => 1,
100100
'chmod' => 0600,
101-
'polling_interval' => '1000',
101+
'polling_interval' => 100,
102102
],
103103
];
104104

@@ -108,7 +108,7 @@ public static function provideConfigs()
108108
'path' => '/foo/bar/baz',
109109
'pre_fetch_count' => 1,
110110
'chmod' => 0600,
111-
'polling_interval' => '1000',
111+
'polling_interval' => 100,
112112
],
113113
];
114114

@@ -118,7 +118,7 @@ public static function provideConfigs()
118118
'path' => '/foo/bar/baz',
119119
'pre_fetch_count' => 100,
120120
'chmod' => 0666,
121-
'polling_interval' => '1000',
121+
'polling_interval' => 100,
122122
],
123123
];
124124
}

‎pkg/fs/Tests/Symfony/FsTransportFactoryTest.php‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function testShouldAllowAddConfiguration()
5252
'path' => sys_get_temp_dir(),
5353
'pre_fetch_count' => 1,
5454
'chmod' => 0600,
55-
'polling_interval' => 1000,
55+
'polling_interval' => 100,
5656
], $config);
5757
}
5858

@@ -70,7 +70,7 @@ public function testShouldAllowAddConfigurationAsString()
7070
'dsn' => 'fileDSN',
7171
'pre_fetch_count' => 1,
7272
'chmod' => 0600,
73-
'polling_interval' => 1000,
73+
'polling_interval' => 100,
7474
], $config);
7575
}
7676

@@ -84,7 +84,7 @@ public function testShouldCreateConnectionFactory()
8484
'path' => sys_get_temp_dir(),
8585
'pre_fetch_count' => 1,
8686
'chmod' => 0600,
87-
'polling_interval' => 1000,
87+
'polling_interval' => 100,
8888
]);
8989

9090
$this->assertTrue($container->hasDefinition($serviceId));
@@ -94,7 +94,7 @@ public function testShouldCreateConnectionFactory()
9494
'path' => sys_get_temp_dir(),
9595
'pre_fetch_count' => 1,
9696
'chmod' => 0600,
97-
'polling_interval' => 1000,
97+
'polling_interval' => 100,
9898
]], $factory->getArguments());
9999
}
100100

@@ -124,7 +124,7 @@ public function testShouldCreateContext()
124124
'path' => sys_get_temp_dir(),
125125
'pre_fetch_count' => 1,
126126
'chmod' => 0600,
127-
'polling_interval' => 1000,
127+
'polling_interval' => 100,
128128
]);
129129

130130
$this->assertEquals('enqueue.transport.fs.context', $serviceId);

0 commit comments

Comments
 (0)